package com.jews.securityleam.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * 以public开头的URL，不用控制
 */
@RestController
@RequestMapping(value = "public")
public class PublicController {

    @GetMapping("getNews")
    public List<String> getNews() {
        List<String> news = new ArrayList<>();
        news.add("公告1");
        news.add("公告2");
        news.add("公告3");
        return news;
    }
}
